// 模拟聊天会话数据
export const mockChatSessions = [
  {
    chatSessionID: 1,
    user1ID: 1, // 当前用户
    user2ID: 2, // 卖家
    creationTime: '2023-10-01T10:00:00Z'
  },
  {
    chatSessionID: 2,
    user1ID: 1, // 当前用户
    user2ID: 3, // 另一个卖家
    creationTime: '2023-10-05T14:30:00Z'
  }
];

// 模拟用户数据
export const mockUsers = [
  {
    userID: 1,
    username: '我',
    avatar: 'https://placekitten.com/100/100'
  },
  {
    userID: 2,
    username: '卖家小王',
    avatar: 'https://placekitten.com/101/101'
  },
  {
    userID: 3,
    username: '卖家小李',
    avatar: 'https://placekitten.com/102/102'
  }
];

// 模拟聊天消息数据
export const mockChatMessages = [
  // 聊天会话1的消息
  {
    messageID: 1,
    chatSessionID: 1,
    senderID: 1,
    content: '您好，我对您的商品很感兴趣',
    sendTime: '2023-10-01T10:05:00Z',
    status: 'read'
  },
  {
    messageID: 2,
    chatSessionID: 1,
    senderID: 2,
    content: '您好，这件商品是全新的，有什么问题可以问我',
    sendTime: '2023-10-01T10:07:00Z',
    status: 'read'
  },
  {
    messageID: 3,
    chatSessionID: 1,
    senderID: 1,
    content: '请问可以便宜一点吗？',
    sendTime: '2023-10-01T10:10:00Z',
    status: 'read'
  },
  {
    messageID: 4,
    chatSessionID: 1,
    senderID: 2,
    content: '可以的，可以优惠5%',
    sendTime: '2023-10-01T10:15:00Z',
    status: 'read'
  },
  
  // 聊天会话2的消息
  {
    messageID: 5,
    chatSessionID: 2,
    senderID: 1,
    content: '这个商品还在售吗？',
    sendTime: '2023-10-05T14:35:00Z',
    status: 'read'
  },
  {
    messageID: 6,
    chatSessionID: 2,
    senderID: 3,
    content: '是的，还在售',
    sendTime: '2023-10-05T14:40:00Z',
    status: 'read'
  },
  {
    messageID: 7,
    chatSessionID: 2,
    senderID: 1,
    content: '我想了解一下运费情况',
    sendTime: '2023-10-05T14:45:00Z',
    status: 'delivered'
  }
];

// 用于生成新消息ID的计数器
let messageIdCounter = mockChatMessages.length + 1;

// 获取新消息ID
export function getNewMessageId() {
  return messageIdCounter++;
} 